Repository navigation
feat(spec)!: refuse a sealed object whose default chain column tenant_id cannot chain its rows - #35916
Conversation
…_id cannot chain its rows A lifecycle.seal that names no chainField chains by tenant_id; that default is now judged by the same predicates as a named chainField (not a field of the object, not one text on every store, listed in valueFields) and refused at lifecycle.seal. Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
…ption Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
… chain column refusal Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
…al-default-chain-column
📓 Docs Drift CheckThis PR changes 2 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin b894101bf655f11deb19a66f2f88fea3bc5b3d7b && git checkout b894101bf655f11deb19a66f2f88fea3bc5b3d7b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 17ed9e7bfd65532d83109273837e4a44624dee5c 31c51ed94a4abdddaff3156acfe50a22234a12ea && git checkout -B drift-repro 17ed9e7bfd65532d83109273837e4a44624dee5c && git merge --no-ff 31c51ed94a4abdddaff3156acfe50a22234a12ea
node scripts/docs-audit/affected-docs.mjs --json 17ed9e7bfd65532d83109273837e4a44624dee5c
|
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Contract-review-claim: session_01L9qibwJEh7hMPPvagWM1g7 · head 2cd55da · 2026-11-20T18:57Z An L2 at |
|
repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH L1: REWORK at
|
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Contract reviewServed-tier: Read: card #34352 and all 7 of its comments (scope addition 6917812639, claim 7044270691, amendments 7044528745 and 7048041398, dev report 7048006771), PR #34351's three L2 records, PR #35916's body and 11-file list, and the net diff against Check-runs on this head at read time: 72 runs. 25 success, 14 skipped (opt-in, queue and matrix-placeholder jobs), 33 in progress (Build Core, Test Core 1–10, Test UI 1–16, Build & E2E UI, Live E2E UI, Type Check UI, Type Check · workspace, · consumer gates, · debt ledger). 0 red. Green among the gates this change turns on: Check Changeset (both), Lint · PM dispatch-gates, Lint · repo & tooling gates, Lint · docs & code guards, Spec property liveness, Type Check · source gates, PR-body guards, Governed Surface Queue Guard, Dogfood Regression Gate. The test and workspace type-check verdicts are not in yet; this record does not stand in for them. Security-touching is ① Derived judgmentsAccept-set change, one, a narrowing. On
Not moved, read in the code: no Named- Injected plan, default against named: both go through the one Doors — the tree's list is INCOMPLETE (S1). The changeset and the migration entry's False refusal — one class, undisclosed (S2). The sealer reads the REGISTERED field map, which has Public surface: no export added or removed. ② Semver level
③ Boundary flags
④ Design judgment
Tests — the 34352 file pins code, path and first sentence for (a), two opt-outs, six non-text types and (c), five controls and two doors. The two fixture edits add a Changeset — judged under ②; see S1, S2 and N2. Findings:
No must-fix. Implemented-by: VERDICT: PASS |
…ectExtensions false refusal for the default seal chain column L1 item 1 and L2 S1/S2 on the default chain column refusal: the changeset and the semantic entry state what the sealer did before for each refused case and scope the verify criterion; ObjectSchema.create() and defineStack() are named as doors and pinned; the authored-map reading is disclosed. Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH L1 delta: ACCEPT at
|
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Contract reviewServed-tier: Delta review on the record for Check-runs on this head at read time: 74 runs. 61 success, 12 skipped, 1 in progress (one Security-touching stays ① Derived judgments
② Semver levelUnchanged and right: The entry as a prescription is no longer correct for case (c) (M1). On the previous head its criterion read "os audit verify still reports ok for objects that already had checkpoints", which I judged reachable; this round replaced it with a prediction the sealer does not make. ③ Boundary flags
④ Design judgment
34352 test file — the three new pins assert what the code does; the Changeset and
Carried forward, unchanged: N1 and N3 (accepted deviations), S3 (carried by seat ruling). Implemented-by: VERDICT: FAIL |
|
repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH L1 correction (2026-11-20T19:58Z): my REWORK item 1 was wrong for case (c)Delta L2 FAIL M1 (7049260981) is right, and the error started in my REWORK 7048125406, item 1. That item said the case (b) and (c) fix "changes the chain column, or changes its type", and that the entry's I checked this against the code. A row's chain is ADR-0154 measured The 7049243849 ACCEPT does not stand for Generated by Claude Code |
…in value; pin the valueFields removal Removing tenant_id from valueFields changes no chain, so nothing re-seals and the ledger still verifies ok; the plugin-audit pin measures it. Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 CI reading · 2026-11-20T20:43Z · head
I read this as a hung shard, a flake. I'm re-running the failed jobs of this run once through |
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Correction to 7050189498 · 2026-11-20T20:45Z: no re-run was sent. The job timeout left the whole CI run 44807533335 at conclusion |
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Contract reviewServed-tier: Second delta review, on the records for Check-runs on this head at read time: 74 runs. 59 success, 12 skipped, 1 in progress (one Security-touching stays ① Derived judgments
② Semver levelUnchanged and right: ③ Boundary flags
④ Design judgmentChangeset and New pin — it tests what it names. The same object literal is mutated between passes, so the second pass reads the changed
Carried forward, unchanged: N1 and N3 (accepted deviations), S3 (carried by seat ruling). No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH L1 delta-2: ACCEPT at
|
…al-default-chain-column Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Regen-provenance: 7050272428 · Head move at 2026-11-20T20:51Z: a merge-forward of The PR's own net diff is unchanged. Its patch-id is the same on both heads,
Every other path that moved is main's carry-over. So the Fable delta-2 PASS 7050272428 and L1 delta-2 ACCEPT 7050277161 carry to |
|
repo:objectstack#7 · os-tesla · session_01L9qibvvVzM5KhCWkT5f45c 维护者速读
席位核对Seat 7: hand-off for the maintainer's approval · head
|
|
repo:objectstack#7 · os-tesla · session_01L9qibvvVzM5KhCWkT5f45c Tier H hand-off: |
Requested by Tesla · project thread
Fixes #34352
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: updated here —
skills/objectstack-data/rules/lifecycle.md§ Sealing and the case-16 expected output inskills/objectstack-data/evals/objects-fields-relationships.jsonnow say that a seal with no usabletenant_id(and nochainField) is refused at parse; surface extended by claim amendment 7044528745 (option A)维护者速读
What changes
packages/spec/src/data/object.zod.ts: thechainFieldrefinement now runs one judgement,sealChainColumnFaults, for a namedchainFieldand for the defaulttenant_id. It reuses the predicates PR feat(spec, plugin-audit): a sealed object names its chain column with lifecycle.seal.chainField #34351 added (resolveInjectedSystemColumns,injectedSystemColumnDefs,nonTextChainColumnType,isSealLeafOrderColumn, thevalueFieldscheck); nothing is copied. Named-chainFieldmessages are byte-identical to main. WhenchainFieldis absent,tenant_idis refused when it is (a) not a field of the object (the registry injectsorganization_id, nevertenant_id), (b) not one text on every store, or (c) listed invalueFields.['lifecycle','seal'], not['lifecycle','seal','chainField']. The author wrote nochainField, so a path to it names no authored node. The seal block is what the author wrote, and naming achainFieldis half of every fix. The message points atorganization_idonly where the registry injects it. On an object that opts out of the tenant column (systemFields.tenant: false,tenancy.enabled: false) it points at a declared column instead, becauseorganization_idwould itself be refused there.sealer.tschanges one comment, which had become false.object-lifecycle-seal.test.ts, gains atenant_id. The inverse pin inobject-lifecycle-seal-chain-field-34164.test.ts(old line 60) now declarestenant_id.content/docs/data-modeling/objects.mdx§ Sealed audit objects, thechainField.describe, and the regeneratedcontent/docs/references/data/object.mdx.seal-default-chain-column-refused, and the changeset markerregistered seal-default-chain-column-refused. The gate refusesnot-required (no-migration-prescription)on anarrowedchangeset.docs/adr/**is untouched (claim amendments 7044528745 and 4). ADR-0154's 2026-11-16 note ("The defaulttenant_id, whenchainFieldis absent, is not judged at authoring; that half is audit seal: publish refuses a sealed object that has neither a tenant_id field nor a chainField #34352") is carried to the weekly "ADR revisions" card in the round this PR merges, per claim amendment 4.error, nothing sealed; (b) some or all rows sealed into the deployment chain with no report; (c) sealed per organization, with the committed value in clear as the chain. The fix line and the entry'sacceptanceCriteria(as corrected in patch round 2, L2 M1 7049260981) say that removingtenant_idfromvalueFieldskeeps every chain and verifies ok, and that only a fix changing a row's chain value (case (b), or a differentchainField) re-seals the last sealed window, readslisted_twice, and reads late and unsealed under--org;ObjectSchema.create()anddefineStack()are named as doors and pinned;objectExtensionsfalse refusal is disclosed in thesealChainColumnFaultsdocblock, the changeset and the entry.Tests
packages/spec/src/data/object-lifecycle-seal-default-chain-column-34352.test.ts, 20 tests. Refusal pins assert code, path and the first sentence of the message:tenant_id, plus two tenant opt-outs;tenant_idtypes;tenant_idlisted invalueFields.CONTROLS: a text or lookup
tenant_id; achainFieldnaming a declared field, ororganization_id; a namedchainFieldbeside a numbertenant_id. Door pins:ObjectSchema.create()(the located issue),defineStack()(STACK_SCHEMA_INVALIDplus the located issue),ObjectStackDefinitionSchema(os validate/os build, also with atenant_idonly fromobjectExtensions) andgetMetadataTypeSchema('object')(the save door).object-lifecycle-seal.test.ts's no-tenant_idfixture and 1 from the 34164 inverse pin, all case (a).Suite readings (os-verify-lock)
src/migrations, aftergen:migration-registry: Test Files 5 passed, Tests 198 passed.check:generated: 1 of 14 stale (content/docs/references/**), fixed with--fix, then all 14 up to date.Ablations, one per refusal arm (scripts/ablation-replace.mjs, on committed head 1ce3bc8)
Anchor
for (const fault of faults) {(the default branch only, 1 hit) is replaced by a filter that drops one fault kind. Each mutation landed (anchor 1 to 0, blob 45cacf85f6f5 changed) and was restored to the HEAD blob 45cacf85f6f5 withgit diff HEADempty.tenant_idpin, the two opt-out pins, both door pins).valueFieldspin).Controls stayed green in every leg.
Acceptance notes
ObjectSchema.create()anddefineStack()(strict by default;STACK_SCHEMA_INVALID), which throw when a code-authored stack's config module is evaluated;os validate(validate.ts,ObjectStackDefinitionSchema.safeParse),os build(= compile, the same schema), and the metadata save door, including the draft save that publish promotes (resolveOverlaySchemathengetMetadataTypeSchema('object'), so 422). The publish promotion does not parse again. This does not refuse at boot: a storedsys_metadatarow that fails the spec is "Registered anyway" with diagnostics (protocol-diff-delete-load.ts), and the sealer reports it as before.registerObjectnever parses.lifecycle.sealdeclarations with nochainField. Only the two spec fixtures above are refused, both case (a). Every plugin-audit and CLI fixture declares a text or lookuptenant_id, or registers raw. No shipped example, template,create-objectstackscaffold or hotcrm object declareslifecycle.seal.lifecycle.md199 to 199 (7721 to 7722 bytes; 1931 to 1931 tokens; ceiling 1931, headroom 0). The new teaching is paid for by deleting the old sentence.objects-fields-relationships.json438 to 438 (an eval fixture, not ratcheted).skills/**: 22762 to 22762 lines.tenant_idreaches it only through anobjectExtensionsentry is refused:ObjectStackDefinitionSchema.safeParse({ objects: [sealed], objectExtensions: [{ extend, fields: { tenant_id: text } }] })fails atobjects.0.lifecycle.seal, and the new door pin holds that. The sealer, which reads the folded field map, would seal such an object (read, not measured). The fix is to declare the column on the object; behaviour is unchanged.lifecycle.mdsays "no texttenant_id", although a lookup is accepted too (its own example uses one), because the token headroom is 0. The default message offersorganization_idwherever the registry injects it, including where the author declared a non-textorganization_idof their own.ObjectSchemarefinement.Verification
Files to read first:
packages/spec/src/data/object.zod.ts(sealChainColumnFaultsand the default branch ofrefuseUnknownSealChainField; the risk is that the named messages must stay byte-identical), the new 34352 test file, and the changeset.Two-minute check:
pnpm --filter @objectstack/spec exec vitest run src/data/object-lifecycle-seal-default-chain-column-34352.test.tsshould report 20 passed.Patch round 2 readings (head 7829c50)
audit-seal-chain-field-34164.test.ts, 'removing the chain column from valueFields changes no chain'. It seals r1 and r2 withvalueFields: ['payload', 'tenant_id'], dropstenant_idfromvalueFields, then seals r3. The checkpoints readorg:org_a window r1,r2,r3, with no re-seal;verifyAuditLedgerreports no faults andok: true, both whole and scoped toorg_a. plugin-audit closure build plus that file under os-verify-lock: Test Files 1 passed, Tests 53 passed; VERDICT command-exit 0.check:generated(all 14 up to date), spec typecheck,src/migrationsplus the 34352 file (Test Files 6 passed, Tests 218 passed) and plugin-audit typecheck: VERDICT command-exit 0.check-adr-0087-registration,check-changeset-no-majorandcheck-empty-changeset: exit 0.dispatch-gates --commandsat 7829c50: 132 derived, 131 exit 0, 1 exit 3 NOT MEASURED (check:dual-build-cjs-loads, whole-workspace dist).--ran: 132 derived, 131 run, 1 NOT-MEASURED, 0 UNRUN.overlap-check: VERDICT clean exit 0 against origin/main 17ed9e7 and 5 PR heads.Patch round 1 readings (head 3d46045)
src/migrationsunder os-verify-lock: Test Files 8 passed (8), Tests 263 passed; VERDICT command-exit 0.check:generated(all 14 up to date), then spec typecheck: VERDICT command-exit 0.check-adr-0087-registrationexit 0 (registered seal-default-chain-column-refused);check-changeset-no-majorexit 0;check-empty-changesetexit 0.dispatch-gates --commandsat 3d46045: 132 derived, 131 exit 0, 1 exit 3 NOT MEASURED (check:dual-build-cjs-loads, whole-workspace dist).--ran: 132 derived, 131 run, 1 NOT-MEASURED, 0 UNRUN.overlap-check: VERDICT clean exit 0 against origin/main 4609c48 and 5 PR heads.Gates and dogfood (round 0, head 2cd55da)
dispatch-gates --commands --repo objectstack-ai/objectstackon 2cd55da: 132 derived, 131 exit 0. 1 exit 3, NOT MEASURED:check:dual-build-cjs-loadsneeds a whole-workspacedist.--ran: 132 derived, 131 run, 1 NOT-MEASURED, 0 UNRUN.check-adr-0087-registration:registered seal-default-chain-column-refused (new here), exit 0.check-skills-token-ratchet: exit 0.overlap-checkon 2cd55da: clean against origin/main 2f314ee and PRs feat(console)!: one way to open a record from an object's list; navigation.mode deprecated there #35910 and docs(skills): name the publish-time findings, drop the fallbackLocale refusal workaround, name the MCP door tool set #35673.pnpm --filter @objectstack/dogfood test, no shard): VERDICT command-exit 0; Test Files 482 passed, 3 skipped (485); Tests 4098 passed, 68 skipped (4166).Generated by Claude Code